<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>9-布尔类型转换-true-false</title>
	</head>
	<body>
		<script type="text/javascript">
			//0、NaN、null、undefined  
			var x = Boolean(0);
			var y = Boolean(NaN);
			var z = Boolean(null);
			var u = Boolean(undefined);
			var o = Boolean('12');
			var w = Boolean('');
			//false--false--false--false--true--false
			console.log(x+'--'+y+'--'+z+'--'+u+'--'+o+'--'+w)
			
		</script>
	</body>
</html>
